﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Skynet.LiteFoundation.BusinessEntities;

namespace Skynet.LiteFoundation.DataAccess
{
    public class ExamCategoryRepository : MasterRepository<ExamCategory>, IExamCategoryRepository
    {

        public ExamCategoryRepository()
        {
 
        }

        public void Maintenance(ExamCategory item)
        {

            

            switch (item.EntityState)
            {
                case System.Data.EntityState.Added:
                    this.Context.ExamCategories.AddObject(item);
                    break;
                case System.Data.EntityState.Deleted:
                    break;
                case System.Data.EntityState.Detached:
                    this.Context.ExamCategories.AddObject(item);
                    break;
                case System.Data.EntityState.Modified:
                    break;
                case System.Data.EntityState.Unchanged:
                    break;
                default:
                    break;
            }

            this.Context.SaveChanges();
            
        }
    }
}
